package com.example2.pathmenudemo;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;

import com.example2.pathmenudemo.SatelliteMenu.SateliteClickedListener;

public class SatelliteMenuActivity extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		SatelliteMenu menu = (SatelliteMenu) findViewById(R.id.menu);

		List<SatelliteMenuItem> items = new ArrayList<SatelliteMenuItem>();
		items.add(new SatelliteMenuItem(3, R.drawable.composer_sleep));
		items.add(new SatelliteMenuItem(2, R.drawable.composer_thought));
		items.add(new SatelliteMenuItem(1, R.drawable.composer_with));
		menu.addItems(items);        

		menu.setOnItemClickedListener(new SateliteClickedListener() {

			public void eventOccured(int id) {
				if (id == 1) {
					Toast.makeText(SatelliteMenuActivity.this, "a", Toast.LENGTH_LONG).show();
				} else if (id == 2) {
					Toast.makeText(SatelliteMenuActivity.this, "b", Toast.LENGTH_LONG).show();
				} else if (id == 3) {
					Toast.makeText(SatelliteMenuActivity.this, "c", Toast.LENGTH_LONG).show();
				}
			}
		});
	}
}